// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.forum-topic-title {
  @_top: forum-topic-title;

  .default-gutter-v2(-5px);
  padding-top: 5px;
  padding-bottom: 5px;

  background-color: @osu-colour-b4;
  display: flex;
  flex-direction: column;

  @media @desktop {
    flex-direction: row;
  }

  &__item {
    margin: 5px;

    &--counters {
      flex: none;
    }

    &--main {
      flex: 1;
    }
  }

  &__title {
    .reset-input();
    font-size: @font-size--title;
    font-style: normal;
    color: @osu-colour-c1;
    border-bottom: 1px solid transparent;
    line-height: normal;
    overflow-wrap: anywhere;

    &--display {
      .@{_top}__title-container[data-title-edit="1"] & {
        opacity: 0;
      }
    }

    &--edit {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      display: none;
      border-bottom-color: @osu-colour-d1;

      .@{_top}__title-container[data-title-edit="1"] & {
        display: block;
      }
    }
  }

  &__title-container {
    margin-bottom: 5px;
    position: relative;
  }

  &__post-time {
    color: @osu-colour-c2;
    font-size: @font-size--normal;
  }
}
